package com.smart.sso.server.service.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.smart.mvc.model.Pagination;
import com.smart.mvc.service.mybatis.impl.ServiceImpl;
import com.smart.sso.server.dao.GroupDao;
import com.smart.sso.server.model.Group;
import com.smart.sso.server.service.GroupService;

@Service("groupService")
public class GroupServiceImpl extends ServiceImpl<GroupDao, Group, Integer> implements GroupService {

	@Override
	public void enable(Boolean isEnable, List<Integer> idList) {
		// TODO Auto-generated method stub
		this.dao.enable(isEnable, idList);
	}

	@Override
	public Pagination<Group> findPaginationByName(String name, Integer pid, Pagination<Group> p) {
		// TODO Auto-generated method stub
		this.dao.findPaginationByName(name, true, pid, p);
		return p;
	}

	@Override
	public List<Group> findByIds(List<Integer> idList) {
		// TODO Auto-generated method stub
		return this.dao.findByIds(idList);
	}

	@Override
	@Autowired
	public void setDao(GroupDao dao) {
		// TODO Auto-generated method stub
		this.dao = dao;
	}
	
}
